package com.observer;

import com.observer.producer.Subject;
import com.observer.subscriber.BinaryObserver;
import com.observer.subscriber.HexObserver;
import com.observer.subscriber.OctalObserver;

public class Test {
    public static void main(String[] args) {
        Subject subject = new Subject();
        new BinaryObserver(subject);
        new OctalObserver(subject);
        new HexObserver(subject);

        System.out.println("First state change: 15");
        subject.setState(15);
        System.out.println("---------------------------------");
        System.out.println("Second state change: -2");
        subject.setState(-2);
    }
}
